<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="utf-8"/>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=Edge">
    <meta name="viewport" content="target-densitydpi=640,width=1280,user-scalable=yes">
    <base href="<?php echo $system['siteRoot'];?>" />
    <title>首页 - 普团</title>
    <?php import_tpl("fragment/icon.php"); ?>
    <link rel="stylesheet" href="plugin/reset.css"/>
    <link rel="stylesheet" href="plugin/awesome4/css/font-awesome.min.css"/>
    <link rel="stylesheet" href="style/common.css"/>
    <link rel="stylesheet" href="style/goods.css"/>
    <link rel="stylesheet" href="style/index.css">
    <link rel="stylesheet" href="style/banner.css">
    <script src="plugin/jquery-1.11.2.min.js"></script>
    <script type="text/javascript">_root='<?php echo $system['siteRoot'];?>'</script>
    <script src="script/api.js"></script>
    <script src="script/banner.js"></script>
    <script src="script/index.js"></script>
</head>
<body>
<div id="container" class="index">
    <?php import_part("custom.home","userBar"); ?>
    <?php import_part("custom.home","header"); ?>
    <?php import_tpl("fragment/nav.php"); ?>
    <div class="main-container">
        <div class="left">
            <div class="slide">
                <a class="nav-all" href="<?php e_page("goods", "category"); ?>">所有商品分类<i class="fa fa-angle-down"></i></a>
                <a class="menu menu-normal" data-nav="0" href="javascript:">猜您喜欢 <i class="fa fa-angle-right"></i></a>
                <?php foreach($r['normal'] as $k=>$v){
                    if(!empty($v['goods'])){?>
                <a class="menu menu-label"  data-nav="<?=$k+1?>" href="javascript:"><?=$v['name']?> <i class="fa fa-angle-right"></i></a>
                <?php }} ?>
            </div>
            <div class="qr-code-box">
                <img class="control-QR" src="images/weixin.png" alt="扫描二维码关注" title="关注我们的微信"/>
                <div>
                    <p class="weixin">扫描二维码</p>
                    <p class="concern">关注我们的微信</p>
                </div>
            </div>
        </div>
        <div class="right">
            <div class="publicity-pic">
                <div class="picBox likyh-banner" style="width:1025px;height:430px">
                    <ul class="banner-slides">
                    <?php foreach($r['ad'] as $v){ ?>
                        <li><a href="<?=$v['url']?>"><img src="<?=$v['picture_url']?>" /></a></li>
                    <?php } ?>
                    </ul>
                </div>
            </div>
            <div class="goods-plate js-menu-love" data-nav='0'>
                <div class="categro"><p><i class="fa fa-heart-o"></i>猜您喜欢</p></div>
                <?php foreach ($r['like'] as $v) {?>
                    <div class="goods">
                        <div class="goods-pic-info">
                            <a class="goods-image" href="<?php e_page('goods','index',array('id'=>$v['gopen_id']));?>" ><img src="<?=$v['thumb']?>" alt="" title="<?=$v['name']?>"/></a>
                            <a class="goods-name" href="<?php e_page('goods','index',array('id'=>$v['gopen_id']));?>"><h4><?=$v['name']?></h4></a>
                        </div>
                        <div class="price"><?=$v['price']['base_price']?></div>
                        <div class="goods-cart js-goods-cart"><a href="<?php e_page('goods','index',array('id'=>$v['gopen_id'])) ?>" title="查看详情">查看详情</a></div>
                    </div>
                <?php }?>
                <div class="goods-more">
                    <a href="<?php e_page('goods','label', "label_id=3") ?>">查看更多您喜欢的，请点击此处<i class="fa fa-angle-right"></i></a>
                </div>
            </div>
            <?php foreach($r['normal'] as $k=>$v){
                if(!empty($v['goods'])){
                switch($v['name']){
                    case '农资':$iClass="fa fa-apple";break;
                    case '房产':$iClass="fa fa-building-o";break;
                    case '百货':$iClass="fa fa-barcode";break;
                    case '家电':$iClass="fa fa-desktop";break;
                    case '餐饮娱乐':$iClass="fa fa-cutlery";break;
                    default:$iClass="fa fa-heart-o";
                }?>
                <div class="goods-plate js-menu-1 " data-nav='<?=$k+1?>'>
                    <div class="categro"><p><i class="<?=$iClass ?>"></i><?=$v['name']?></p></div>
                    <?php foreach ($v['goods'] as $v2) { ?>
                        <div class="goods">
                            <div class="goods-pic-info">
                                <a class="goods-image" href="<?php e_page('goods','index',array('id'=>$v2['gopen_id'])) ?>"><img src="<?=$v2['thumb']?>" alt="" title="<?=$v2['name']?>"/></a>
                                <a class="goods-name" href="<?php e_page('goods','index',array('id'=>$v2['gopen_id'])) ?>"><h4><?=$v2['name']?></h4></a>
                            </div>
                            <div class="price"><?=$v2['price']['base_price']?></div>
                            <div class="goods-cart js-goods-cart"><a href="<?php e_page('goods','index',array('id'=>$v2['gopen_id'])) ?>" title="查看详情">查看详情</a></div>
                        </div>
                    <?php }?>
                    <div class="goods-more">
                        <a href="<?php e_page('goods','category',array('cat_id'=>$v['id'])) ?>">查看更多您喜欢的，请点击此处<i class="fa fa-angle-right"></i></a>
                    </div>
                </div>
            <?php }}?>

            </div>
        </div>
    </div>
    <?php import_tpl("fragment/footer.php"); ?>
</div>
</body>
</html>